<template>
  <view>
	  <div class="myUnit">
	  	<u-cell-group :border='false'>
	  		<u-cell title="昵称" :value="user.nickName"></u-cell>
	  		<u-cell title="手机号码" :value="user.phonenumber"></u-cell>
	  		<u-cell title="邮箱" :value="user.email"></u-cell>
	  		<u-cell title="角色" :value="roleGroup"></u-cell>
	  		<u-cell title="创建日期" :value="user.createTime"></u-cell>
	  	</u-cell-group>
	  </div>
  </view>
</template>

<script>
  import { getUserProfile } from "@/api/system/user"

  export default {
    data() {
      return {
        user: {},
        roleGroup: "",
        postGroup: ""
      }
    },
    onLoad() {
      this.getUser()
    },
    methods: {
      getUser() {
        getUserProfile().then(response => {
          this.user = response.data
          this.roleGroup = response.roleGroup
          this.postGroup = response.postGroup
        })
      }
    }
  }
</script>